﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

using System.Collections.Generic;

namespace CQIE.LabAssist.Models
{
    /// <summary>
    /// 系统功能
    /// </summary>
    [Table("TB_Menu")]
    public class Menu
    {
        /// <summary>
        /// 功能ID编号
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 父功能ID编号
        /// </summary>
        public int? ParentId { get; set; }

        /// <summary>
        /// 功能图标
        /// </summary>
        public string icon { get; set; }

        /// <summary>
        /// 功能名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 功能目标地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 子菜单项集合
        /// </summary>
        [ForeignKey("ParentId")]
        public virtual ICollection<Menu> Children { get; set; }
    }
}
